<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <?php
        if(isset($_POST['option']))
        {
            include("../Service/WebClass/report/AdGroupService.php");

            $AdGroupService = new AdGroupService();
            $message = $AdGroupService->updateAllAdGroups();
            echo "<script language='javascript'>alert(\"".$message."\");</script>";
        }
    ?>
    <title>AD Listing</title>
    <link rel="stylesheet" href="../css/common.css" type="text/css" />
    <script language="JavaScript" src="../js/InputCheck.js" type="text/javascript"></script>
</head>

<body>
    <form enctype="multipart/form-data" name="mainform" method="post">
        <input type="hidden" name="option" value="upAll"/>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td class="menu_path_left"></td>

                <td class="menu_path">レポート ＞ 広告グループ一括更新
                </td>
                <td class="menu_path_right"></td>
            </tr>
        </table>
        <br>
        <table width="100%" border="0" cellpadding="2" cellspacing="0">
            <tr>
                <td align="left">
                </td>
                <td align="right">

                    <input type="submit" class="btn save" value="" onclick="return checkSelect_adgrUpAll();">
                </td>
            </tr>
        </table>

        <table width="100%" border="0" cellpadding="4" cellspacing="0" class="tbl">
            <tr>
                <td class="td9" align="left">
                    <input type="checkbox" name="change_url" id="change_url" value="1" >
                    <?php
                        if($_POST['change_url'] == "1")
                        {
                            echo "<script>document.mainform.change_url.checked=true;</script>";
                        }
                    ?>
                    <label for="change_url">ランディングページURL を変更する</label>

                </td>
                <td class="td4 left">
                    <input type="text" name="landing_url" size="60" maxlength="1000" value="<?php echo $_POST['landing_url'];?>" class="txBox">
                    <br>
                    <input type="radio" name="count_by_creative" id="count_by_creative0" value="0" checked><label for="count_by_creative0">キーワード単位で計測</label>
                    <input type="radio" name="count_by_creative" id="count_by_creative1" value="1" ><label for="count_by_creative1">クリエイティブ単位で計測</label>
                </td>
                <?php
                                if($_POST['count_by_creative'] == "1")
                                {
                                    echo "<script>document.mainform.count_by_creative[1].checked=true;</script>";
                                }
                                else
                                {
                                    echo "<script>document.mainform.count_by_creative[0].checked=true;</script>";
                                }
                            ?>
            </tr>

            <tr>
                <td class="td9 top" align="left" width="200">
                    <input type="checkbox" name="change_sponsored_search" id="change_sponsored_search" value="1" >
                     <?php
                        if($_POST['change_sponsored_search'] == "1")
                        {
                            echo "<script>document.mainform.change_sponsored_search.checked=true;</script>";
                        }
                    ?>
                    <label for="change_sponsored_search">スポンサードサーチを変更する</label>
                </td>
                <td class="td4 border">
                    最高入札額
                    <input type="text" name="sponsored_maxbid" size="6" maxlength="10" value="<?php echo $_POST['sponsored_maxbid'];?>" class="txBox">
                </td>

            </tr>
            <tr>
                <td class="td9 top" align="left" width="200">
                    <input type="checkbox" name="change_contents_match" id="change_contents_match" value="1" >
                    <?php
                        if($_POST['change_contents_match'] == "1")
                        {
                            echo "<script>document.mainform.change_contents_match.checked=true;</script>";
                        }
                    ?>
                    <label for="change_contents_match">コンテンツマッチを変更する</label>
                </td>
                <td class="td4 border">
                    最高入札額
                    <input type="text" name="content_maxbid" size="6" maxlength="10" value="<?php echo $_POST['content_maxbid'];?>" class="txBox">

                </td>
                <?php
                    if($_POST['content_match'] == "0")
                    {
                        echo "<script>document.mainform.content_match[1].checked=true;</script>";
                    }
                    else
                    {
                        echo "<script>document.mainform.content_match[0].checked=true;</script>";
                    }
                ?>
            </tr>
            <tr>
                <td class="td9 top" align="left" width="200">
                    <input type="checkbox" name="change_status" id="change_status" value="1" >
                    <?php
                        if($_POST['change_status'] == "1")
                        {
                            echo "<script>document.mainform.change_status.checked=true;</script>";
                        }
                    ?>
                    <label for="change_status">掲載オン/オフを切り替える</label>
                </td>
                <td class="td4 border">

                    <input type="radio" name="status" id="status1" value="1" ><label for="status1">オン</label>
                    <input type="radio" name="status" id="status0" value="0" checked><label for="status0">オフ</label>
                </td>
                <?php
                    if($_POST['status'] == "0")
                    {
                        echo "<script>document.mainform.status[1].checked=true;</script>";
                    }
                    else
                    {
                        echo "<script>document.mainform.status[0].checked=true;</script>";
                    }
                ?>
            </tr>
        </table>

    </form>						<!-- end of main area -->

    </td>
    <td class="frame_middle_right"></td>
    </tr>
    </table>

    </td>
    <td width="20"><br></td>
    </tr>
    </table>
    </form>
    <table width="100%" border="0" cellpadding="2" cellspacing="0">
        <tbody><tr>
                <td align="center">
                    <input class="btn close" onclick="javascript:self.close();" type="button">
                </td>
            </tr>
    </tbody></table>
</body>
</html>
